NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Technical Q&A QD3D70
Finding The Center Of A Model


Q: How can I find the center of a model, so I can position the camera to completely display the model (much like the "home" camera position in the Simple Viewer)?

A: Use the Q3View_StartBoundingBox and Q3View_EndBoundingBox routines to compute an object's bounding box. Next, use the data in the TQ3BoundingBox structure returned by Q3View_EndBoundingBox to compute the center of the object.

[Jul 11 1997]


Developer Documentation | Technical Notes | Development Kits | Sample Code